Page({
  data: {
      list: [1,2,3,4,5,6,7,8,9,10],
      isFixed: false,
      fixedTop: 0,
      topPadding: 0
  },
  onLoad: function () {
      let query = wx.createSelectorQuery();
      query.select(".tabBar").boundingClientRect((res) => {
          this.setData({
              fixedTop: res.top          })
      }).exec()
  },
  onPageScroll: function (e) {
      if (e.scrollTop > this.data.fixedTop) {
          this.setData({ isFixed: true })
      } else {
          this.setData({ isFixed: false })
      }
  }
})